using System.Configuration;

namespace IFXplus.SmartStorage.Settings
{
    public class WebServiceStorageProviderSettings : BaseStorageProviderSettings
    {

        #region StorageProviderType

        public override StorageProviderType Type
        {
            get { return StorageProviderType.WebService; }
        }

        #endregion

        [ConfigurationProperty("url", DefaultValue = "http://localhost/WebServiceStorageProvider.asmx", IsKey = false, IsRequired = true)]
        public string Url
        {
            get { return (string)base["url"]; }
            set { base["url"] = value; }
        }

        [ConfigurationProperty("username", DefaultValue = "", IsKey = false, IsRequired = true)]
        public string Username
        {
            get { return (string)base["username"]; }
            set { base["username"] = value; }
        }

        [ConfigurationProperty("password", DefaultValue = "", IsKey = false, IsRequired = true)]
        public string Password
        {
            get { return (string)base["password"]; }
            set { base["password"] = value; }
        }

        [ConfigurationProperty("allowRead", DefaultValue = "true", IsKey = false, IsRequired = true)]
        public bool AllowRead
        {
            get { return (bool)base["allowRead"]; }
            set { base["allowRead"] = value; }
        }

        [ConfigurationProperty("allowWrite", DefaultValue = "true", IsKey = false, IsRequired = true)]
        public bool AllowWrite
        {
            get { return (bool)base["allowWrite"]; }
            set { base["allowWrite"] = value; }
        }

    }
}
